import 'package:json_annotation/json_annotation.dart';
part 'flower_list_api.g.dart';

@JsonSerializable()
class ResponseFlowerListApi {
  final int total;
  final List<Flower>? rows;

  ResponseFlowerListApi(this.total, this.rows);

  factory ResponseFlowerListApi.fromJson(Map<String, dynamic> json) =>
      _$ResponseFlowerListApiFromJson(json);

  Map<String, dynamic> toJson() => _$ResponseFlowerListApiToJson(this);

  static initial() {
    return ResponseFlowerListApi(0, []);
  }
}

@JsonSerializable()
class Flower {
  final String followUuid;
  final String? followUserNickname;
  final String? followUserAvatars;
  final bool? isFollow;
  final String? followTime;

  factory Flower.fromJson(Map<String, dynamic> json) {
    return _$FlowerFromJson(json);
  }

  Flower({
    required this.followUuid,
    required this.followUserNickname,
    required this.followUserAvatars,
    required this.isFollow,
    required this.followTime,
  });

  Map<String, dynamic> toJson() => _$FlowerToJson(this);
}
